package 终极案例;

import java.util.Scanner;

public class tset05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[6];
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入分数:");
            int a = sc.nextInt();
            arr[i] = a;

        }

        System.out.print("[");
        for (int i1 = 0; i1 < arr.length; i1++) {
            if (i1 == arr.length - 1) {
                System.out.print(arr[i1]);
            } else {
                System.out.print(arr[i1] + ",");
            }
        }
        System.out.println("]");

        int sum = 0;
        for (int i1 = 0; i1 < arr.length; i1++) {
            sum += arr[i1];
        }

        for (int i1 = 0; i1 < arr.length; i1++) {
            if (arr[0] > arr[i1]) {
                arr[0] = arr[i1];
            }

        }

        double avg = 1.0F * (sum - arr[0]) / (arr.length - 1);
        System.out.println("平均成绩为" + avg);

    }
}
